package com.es.service.impl;

import com.es.dao.ICBCAccountDao;
import com.es.entity.ICBCAccount;
import com.es.service.ICBCAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

@Service
public class ICBCAccountServiceImpl implements ICBCAccountService {

    @Autowired
    private ICBCAccountDao dao;

    @Override
    @Transactional(noRollbackFor = ArithmeticException.class)
    public int createAccount(ICBCAccount icbcAccount) {
        return dao.createAccount(icbcAccount);
    }

    @Override
    public int withdraw(String cardNo, BigDecimal mount) {
        return 0;
    }

    @Override
    public int deposit(String cardNo, BigDecimal mount) {
        return 0;
    }
}
